<template>
  <div>
    <h1>App 根组件</h1>
    <hr>
    <button @click="flag=!flag" >Toggle</button>
    <life-cycle v-if="flag" ></life-cycle>
   
  </div>
</template>

<script>
import LifeCycle from './LifeCycle.vue'
export default {
    data(){
        return {
            flag:true
        }
    },
    components:{
        LifeCycle
    }
}
</script>

<style>

</style>